﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace foursquare.Services
{
    internal delegate void LocationChangedDelegate(foursquare.Location.GeoLocation location);

    /// <summary>
    /// Service for raising UI-consumable events for location changes
    /// </summary>
    internal class LocationTextService : GeoService
    {
        internal event LocationChangedDelegate LocationChanged;

        /// <summary>
        /// Updates the specified location.
        /// </summary>
        /// <param name="location">The location.</param>
        internal override void Update(foursquare.Location.GeoLocation location)
        {
            if (LocationChanged != null)
            {
                this.LocationChanged(location);
            }
        }
        /// <summary>
        /// Gets the service's friendly name.
        /// </summary>
        /// <value>The name.</value>
        internal override string Name
        {
            get { return "InternalService"; }
        }
    }
}
